package com.alibaba.algo.dao.user;

import com.alibaba.algo.cooperation.usercomponent.vo.res.user.EmployeePositionResVO;
import com.alibaba.algo.entity.user.SysEmployeePosition;
import com.alibaba.algo.core.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 类SysEmployeePositionMapper.java的实现描述：员工和岗位关系Mapper
 *
 * @author nieganggang 2021-03-12 16:08:17
 */
public interface SysEmployeePositionMapper extends BaseMapper<SysEmployeePosition> {

    /**
     * 删除岗位
     *
     * @param employeeId 员工标识
     * @return 删除结果
     */
    public Integer deleteByEmployeeId(Long employeeId);

    /**
     * 查询员工的岗位列表 有效数据
     *
     * @param employeeId 员工标识
     * @return 岗位列表
     */
    List<EmployeePositionResVO> selectEmployeePositionListByEmployeeId(@Param("employeeId") Long employeeId);

    /**
     * 查询员工的岗位列表 全部数据
     *
     * @param employeeId 员工标识
     * @return 岗位列表
     */
    public List<EmployeePositionResVO> selectEmployeePositionListByEmployeeIdDefaultAll(@Param("employeeId") Long employeeId, @Param("isDeleted") String isDeleted);

    /**
     * 删除岗位
     *
     * @param positionId 岗位标识
     * @return 删除结果
     */
    public Integer deleteByPositionId(Long positionId);

    public Integer deleteByMid(String mid);

    public Integer updateByMid(@Param("obj") SysEmployeePosition sysEmployeePosition);

    public Integer countByMid(String mid);

    public Integer updateByEmployeeId(@Param("obj") SysEmployeePosition sysEmployeePosition);

    public Integer updateByPositionId(@Param("obj") SysEmployeePosition sysEmployeePosition);

    public Integer updateByEmployeeIdLastModified(@Param("obj") SysEmployeePosition sysEmployeePosition,@Param("lastModifyTime") LocalDateTime lastModifyTime);
}
